// Needs to be included multiple times with the proper #define set at each inclusion
//#ifndef __AUTO_GEN_SUPPORT_HPP__
//#define __AUTO_GEN_SUPPORT_HPP__

#ifdef __TASK_TAG_INIT__
#define RSTREAM_TASK_TAG_INIT(ID, TOTDIM, ITDIM, ...)   \
  {                                                     \
    TaskTag<ID, TOTDIM, ITDIM> t(__VA_ARGS__);          \
    c.getTagCollection(t).put(t);                       \
  }
// TBD what to do with the context.put 
#endif // __TASK_TAG_INIT__


#ifdef __EDT_DECL__
#define RSTREAM_EDT_DECL(ID, TOTDIM, ITDIM)                             \
  CNCTask_tuner <ID, TOTDIM, ITDIM> m_tuner_##ID;                       \
  CnC::item_collection< TaskTag<ID, TOTDIM, ITDIM>,                     \
                        void *, CNCTask_tuner<ID, TOTDIM, ITDIM> > items_##ID; \
  CnC::tag_collection< TaskTag<ID, TOTDIM, ITDIM>,                      \
                       CNCTask_tuner<ID, TOTDIM, ITDIM> > m_tags_##ID;  \
  CnC::step_collection< CNCTask_step<ID, TOTDIM, ITDIM>,                \
                        CNCTask_tuner<ID, TOTDIM, ITDIM> > m_steps_##ID; \
                                                                        \
  inline CnC::item_collection< TaskTag<ID, TOTDIM, ITDIM>,              \
                               void *, CNCTask_tuner<ID, TOTDIM, ITDIM> >& \
  getItemCollection(const TaskTag<ID, TOTDIM, ITDIM> &) {               \
    return items_##ID;                                                  \
  }                                                                     \
  inline CnC::tag_collection<TaskTag<ID, TOTDIM, ITDIM>,                \
                             CNCTask_tuner<ID, TOTDIM, ITDIM> >&        \
  getTagCollection(const TaskTag<ID, TOTDIM, ITDIM> &) {                \
    return m_tags_##ID;                                                 \
  }                
#endif // __EDT_DECL__

#ifdef __EDT_INLINE_INITIALIZATION__
#define RSTREAM_EDT_INLINE_INITIALIZATION(ID, TOTDIM, ITDIM)            \
  , m_tuner_##ID(), items_##ID(*this, "items_##ID", m_tuner_##ID),      \
    m_tags_##ID(*this), m_steps_##ID(*this)
#endif // __EDT_INLINE_INITIALIZATION__

#ifdef __EDT_INITIALIZATION__
#define RSTREAM_EDT_INITIALIZATION(ID, TOTDIM, ITDIM)                  \
  m_tags_##ID.prescribes( m_steps_##ID, *this );                       \
  m_steps_##ID.consumes( items_##ID );                                 \
  m_steps_##ID.produces( items_##ID );
#endif //__EDT_INITIALIZATION__

//#endif // __AUTO_GEN_SUPPORT_HPP__
